// 跟用户相关的请求都在这里

// 导入request(axios)
import request from '@/utils/request'

export const userReg = (data) => {
  try {
    return request.post('/user/register', data)
  } catch (error) {
    console.dir(error)
  }
}

// 登录
export const login = (data) => {
  return request.post('/user/login', data)
}

// 获取用户信息
export const getUserInfo = () => {
  return request('/user/currentUser')
}
